package com.weishu.house.controller;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.weishu.house.entity.CfContract;
import com.weishu.house.entity.HouseInfo;
import com.weishu.house.entity.MTenant;
import com.weishu.house.service.ICfContractService;
import com.weishu.house.service.IHouseInfoService;
import com.weishu.house.service.IMTenantService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gao
 * @since 2021-05-25
 */
@RestController
@RequestMapping("/m-tenant")
public class MTenantController {

    @Autowired
    private IHouseInfoService iHouseInfoService;

    @Autowired
    private ICfContractService iCfContractService;

    @RequestMapping("list")
    public PageInfo list(int pageNum, int pageSize, MTenant mTenant){
        PageHelper.startPage(pageNum,pageSize);
        List<CfContract> list = iCfContractService.list();
        PageInfo pageInfo=new PageInfo(list);
        return pageInfo;

    }


}
